package com.ruoyi.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import lombok.Data;


/**
 * <p>
 * 员工车辆表
 * </p>
 *
 * @author asd
 * @since 2024-08-30
 */

@TableName(value ="tb_che_employee")
@Data
public class TbCheEmployee implements Serializable {
    /**
     * 车辆id
     */
    @TableId(type = IdType.AUTO)
    private Long cheId;

    /**
     * 员工id
     */
    private Long employeeId;

    /**
     * 车牌号
     */
    private String cheNumber;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        TbCheEmployee other = (TbCheEmployee) that;
        return (this.getCheId() == null ? other.getCheId() == null : this.getCheId().equals(other.getCheId()))
            && (this.getEmployeeId() == null ? other.getEmployeeId() == null : this.getEmployeeId().equals(other.getEmployeeId()))
            && (this.getCheNumber() == null ? other.getCheNumber() == null : this.getCheNumber().equals(other.getCheNumber()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getCheId() == null) ? 0 : getCheId().hashCode());
        result = prime * result + ((getEmployeeId() == null) ? 0 : getEmployeeId().hashCode());
        result = prime * result + ((getCheNumber() == null) ? 0 : getCheNumber().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", cheId=").append(cheId);
        sb.append(", employeeId=").append(employeeId);
        sb.append(", cheNumber=").append(cheNumber);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}